package hu.dobrosi.util.io;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import javax.microedition.io.StreamConnection;

public class StreamConnectionConnector extends MicroeditionConnectionConnector {
	public InputStream getInputStream() throws IOException {
		return in = ((StreamConnection)connection).openInputStream();
	}

	public OutputStream getOutputStream() throws IOException {
		return out = ((StreamConnection)connection).openOutputStream();
	}

	public void sleep(long millis) throws IOException, InterruptedException {
		close();
		Thread.sleep(millis);
		open(url);
	}
}